package com.zswl.bus.login;

import android.content.Context;
import android.content.Intent;
import android.view.View;

import com.zswl.bus.Api;
import com.zswl.bus.R;
import com.zswl.bus.widget.MyWebView;

public class ProtocolActivity extends BaseActivity implements View.OnClickListener {

    MyWebView myWebView;

    public static void startMe(Context context) {
        Intent intent = new Intent(context, ProtocolActivity.class);
        context.startActivity(intent);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_protocol;
    }

    @Override
    protected void init() {
        myWebView = findViewById(R.id.wv);
        myWebView.loadUrl(Api.HOST_BASE + "userAppApi/userAgreement");
        findViewById(R.id.iv_back).setOnClickListener(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (myWebView != null)
            myWebView.destroy();
    }

    @Override
    public void onClick(View v) {
        finish();
    }
}
